package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysMqMessageMapper;
import com.ruoyi.system.domain.SysMqMessage;
import com.ruoyi.system.service.ISysMqMessageService;

/**
 * mq信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-01
 */
@Service
public class SysMqMessageServiceImpl implements ISysMqMessageService 
{
    @Autowired
    private SysMqMessageMapper sysMqMessageMapper;

    /**
     * 查询mq信息
     * 
     * @param id mq信息主键
     * @return mq信息
     */
    @Override
    public SysMqMessage selectSysMqMessageById(Long id)
    {
        return sysMqMessageMapper.selectSysMqMessageById(id);
    }

    /**
     * 查询mq信息列表
     * 
     * @param sysMqMessage mq信息
     * @return mq信息
     */
    @Override
    public List<SysMqMessage> selectSysMqMessageList(SysMqMessage sysMqMessage)
    {
        return sysMqMessageMapper.selectSysMqMessageList(sysMqMessage);
    }

    /**
     * 新增mq信息
     * 
     * @param sysMqMessage mq信息
     * @return 结果
     */
    @Override
    public int insertSysMqMessage(SysMqMessage sysMqMessage)
    {
        sysMqMessage.setCreateTime(DateUtils.getNowDate());
        return sysMqMessageMapper.insertSysMqMessage(sysMqMessage);
    }

    /**
     * 修改mq信息
     * 
     * @param sysMqMessage mq信息
     * @return 结果
     */
    @Override
    public int updateSysMqMessage(SysMqMessage sysMqMessage)
    {
        sysMqMessage.setUpdateTime(DateUtils.getNowDate());
        return sysMqMessageMapper.updateSysMqMessage(sysMqMessage);
    }

    /**
     * 批量删除mq信息
     * 
     * @param ids 需要删除的mq信息主键
     * @return 结果
     */
    @Override
    public int deleteSysMqMessageByIds(Long[] ids)
    {
        return sysMqMessageMapper.deleteSysMqMessageByIds(ids);
    }

    /**
     * 删除mq信息信息
     * 
     * @param id mq信息主键
     * @return 结果
     */
    @Override
    public int deleteSysMqMessageById(Long id)
    {
        return sysMqMessageMapper.deleteSysMqMessageById(id);
    }
}
